#ifndef QL_ROSTER_H
#define QL_ROSTER_H

#include "xmppim/export.h"

#include <QtCore/QList>
#include <QtCore/QString>

namespace yoohoo_xmppim {

class YOOHOO_XMPPIM_EXPORT RosterItem {

public:
	enum SubscriptionState {
		SubscriptionStateNone,
		SubscriptionStateTo,
		SubscriptionStateFrom,
		SubscriptionStateBoth
	};

	RosterItem(const QString& jid, const QString& name = QString(), const QList<QString>& groups = QList<QString>(),
		const RosterItem::SubscriptionState& subscription = RosterItem::SubscriptionStateNone,
			const QString& ask = QString());
	bool operator==(const RosterItem& other) const;
	const QString& jid();
	const RosterItem::SubscriptionState& subscription();
	const QString& name();
	const QList<QString>& groups();
	const QString& ask();
	void setJid(const QString& jid);
	void setName(const QString& name);
	void setGroups(const QList<QString>& groups);
	void setAsk(const QString& ask);
	void setSubscription(const SubscriptionState& subscription);

private:
	QString _jid;
	RosterItem::SubscriptionState _subscription;
	QString _ask;
	QString _name;
	QList<QString> _groups;
};

class YOOHOO_XMPPIM_EXPORT Roster {
public:
	QList<RosterItem>& rosterItems();
private:
	QList<RosterItem> _rosterItems;
};

}

#endif
